/*
 * Home.java
 *
 * Created on January 29, 2007, 11:11 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package ge.info.pages;


import ge.info.domain.Organization;
import ge.info.domain.Service;
import ge.ktapestry.pages.BasePageExt;
import org.apache.hivemind.util.PropertyUtils;
import org.apache.tapestry.IPage;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.annotations.Persist;

import java.util.List;

public  abstract class OrgResults extends BasePageExt
{
    
    @Persist
    public abstract Service getService();
    public abstract void setService(Service service);    
    
    @Persist("session")
    public abstract List<Organization> getOrganizations();
    public abstract void setOrganizations(List<Organization> organizations);
    
    public abstract Organization getOrganization();
    public abstract void setOrganization(Organization organization);
    
    
    public void openMainResultPage(IRequestCycle cycle, Integer orgID)
    {
        IPage page = cycle.getPage("OrgResultPage");
        PropertyUtils.write(page, "organizationID", orgID);
        PropertyUtils.write(page, "organization", null);
        cycle.activate(page);
    }

}
